﻿using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEngine;

public class FileTools 
{
    public static DirectoryInfo[] GetDirectorys(string path,SearchOption so = SearchOption.TopDirectoryOnly)
    {
        DirectoryInfo root = new DirectoryInfo(path);
        DirectoryInfo[] directorys = root.GetDirectories("*", so);
        return directorys;
    }

    public static FileInfo[] GetFiles(string path, SearchOption so = SearchOption.TopDirectoryOnly)
    {
        DirectoryInfo root = new DirectoryInfo(path);
        FileInfo[] files = root.GetFiles("*", so);
        return files;
    }
}
